<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp" %>
<!DOCTYPE HTML>
<html ng-app>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <META HTTP-EQUIV="pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
    <META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
    <title>${title}</title>
    <%@ include file="/WEB-INF/jsp/commons/meta.jsp" %>
    <link href="${ctx}/resources/new/style.css" type="text/css" rel="stylesheet"/>

</head>
<body>
<script>
    $(document).ready(function () {
        //聚焦第一个输入框
        $("#name").focus();
        //为inputForm注册validate函数
        $("#inputForm").validate({
            rules: {
                box: "required",
                goodsQrContent: "required",
                goodsQr: "required",
                path: "required",
                url: "required",
                integralQr: "required",
                integralQrContent: "required",
                memo: "required"
            }
        });
    });
</script>
<form id="inputForm" class="well form-inline" action="${ctx}/adoms/qrGoodsCode/save" method="post">
    <input type="hidden" name="id" value="${qrGoodsCode.id}"/>
    <table class="table table-striped table-bordered table-condensed">
        <thead>
        <i class="icon-flag"></i>
        <strong>商品二维码表单</strong>
        </thead>
        <tr>
            <td class="span2">所属箱码:</td>
            <td>
                <select id="box" name="box.id">
                    <c:forEach items="${boxList }" var="box">
                        <option value="${box.id }"
                                <c:if test="${qrGoodsCode.box.id == box.id }">selected</c:if>>${box.id}.${box.qrName }</option>
                    </c:forEach>
                </select>
            </td>
        </tr>
        <tr>
            <td>货物二维码内容:</td>
            <td>
                <textarea id="goodsQrContent" name="goodsQrContent" rows="2"
                          class="span6">${qrGoodsCode.goodsQrContent}</textarea>
            </td>
        </tr>
        <tr>
            <td>货物二维码:</td>
            <td>
                <input id="goodsQr" name="goodsQr" type="text" value="${qrGoodsCode.goodsQr}" size="30" maxlength="80"/>
            </td>
        </tr>
        <tr>
            <td>物理存放地址:</td>
            <td>
                <input id="path" name="path" type="text" value="${qrGoodsCode.path}" size="30" maxlength="80"/>
            </td>
        </tr>
        <tr>
            <td>URL:</td>
            <td>
                <input id="url" name="url" type="text" value="${qrGoodsCode.url}" size="30" maxlength="80"/>
            </td>
        </tr>
        <tr>
            <td>积分二维码:</td>
            <td>
                <input id="integralQr" name="integralQr" type="text" value="${qrGoodsCode.integralQr}" size="30"
                       maxlength="80"/>
            </td>
        </tr>
        <tr>
            <td>积分二维码内容:</td>
            <td>
                <textarea id="integralQrContent" name="integralQrContent" rows="2"
                          class="span6">${qrGoodsCode.integralQrContent}</textarea>
            </td>
        </tr>
        <tr>
            <td>备注:</td>
            <td>
                <textarea id="memo" name="memo" rows="4" class="span6">${qrGoodsCode.memo}</textarea>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input class="btn" type="submit" value="提交"/>
                &nbsp;
                <input class="btn" type="button" value="返回" back="back" onclick="history.go(-1)"/>
            </td>
        </tr>
    </table>
</form>
</body>
</html>